package com.choosefine.base.attendance.client.staff
import com.choosefine.base.common.bean.ToolkitBean
import com.choosefine.base.common.model.ReturnResult
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

/*
*
* gen by 邱鹏 controller 2017-08-29
*/
@RestController
@RequestMapping("/choosefine/base/attendance/client/staff")
class AttendanceStaffController {
val logger: Logger = LoggerFactory.getLogger("AttendanceStaffController")
@Autowired lateinit var toolkit: ToolkitBean
@Autowired lateinit var service: AttendanceStaffService
/**
*
*/
@GetMapping()
open fun getAttendanceStaff(attendanceStaff: AttendanceStaff): String {
    var returnResult: ReturnResult = service.getAttendanceStaffList(attendanceStaff)
    var result = toolkit.http.json(returnResult)
    return result
}

/**
*
*/
@PutMapping()
fun updateAttendanceStaff(@RequestBody attendanceStaff: AttendanceStaff): String {
    var returnResult: ReturnResult = service.updateAttendanceStaff(attendanceStaff)
    var result = toolkit.http.json(returnResult)
    return result
}
/**
*
*/
@PostMapping()
fun createAttendanceStaff(@RequestBody attendanceStaff: AttendanceStaff): String {
    var returnResult: ReturnResult = service.createAttendanceStaff(attendanceStaff)
    var result = toolkit.http.json(returnResult)
    return result
}
}